package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tanhua.dubbo.mapper.BlackListMapper;
import com.tanhua.model.domain.BlackList;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author LiKe
 * @date 2022/1/22 16:12
 */
@DubboService
public class BlackListApiImpl implements BlackListApi {

    @Autowired
    private BlackListMapper blackListMapper;

    @Override
    public void deleteById(Long bUId, Long userId) {
        LambdaQueryWrapper<BlackList> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.eq(BlackList::getUserId,userId)
                .eq(BlackList::getBlackUserId,bUId);
        blackListMapper.delete(queryWrapper);
    }
}
